from django.shortcuts import render

# Create your views here.
from myadmin import models


def orderlist(request):
    # 获取数据库order 订单 的所有数据并添加到ob中
    ob = models.Order.objects.all()
    for i in ob:
        user_obj = models.Users.objects.get(id=i.uid)
        i.username = user_obj.username
        # 获取User数据库数据并添加到ob中
        # 获取订单详情信息并添加到ob中


    context = {'ob':ob}
    return render(request,'myadmin/order/orderlist.html',context)